package com.vne.skyemart.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.vne.skyemart.dao.UserLogDao;
import com.vne.skyemart.model.UserLog;
import com.vne.skyemart.service.UserLogService;

@Service("userLogServiceImpl")
@Transactional(propagation = Propagation.SUPPORTS,readOnly = true)
public class UserLogServiceImpl implements UserLogService{
	@Autowired
	private UserLogDao userLogDao;

	public UserLogDao getUserLogDao() {
		return userLogDao;
	}

	public void setUserLogDao(UserLogDao userLogDao) {
		this.userLogDao = userLogDao;
	}
	public UserLogServiceImpl() {}
	@Transactional(propagation = Propagation.SUPPORTS,readOnly = false)
	@Override
	public void addUserLog(UserLog userlog) {
		userLogDao.save(userlog);
	}

	@Override
	public List<UserLog> listUserLog() {
		return userLogDao.findAll();
	}
	
}
